package com.eddie.community.service;

import com.eddie.community.entity.Comment;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Description:评论业务
 * Date: 2021/2/28 0028 14:46
 * Author: Eddie.Zhan
 * Email: eddie_zhan@yeah.net
 */
public interface CommentService {
    /**
     * Description: 通过类型查询评论
     *
     * @return java.util.List<com.eddie.community.entity.Comment>
     * @params [entityType, entityId, offset, limit]
     * @date 2021/2/28 0028 14:50
     * @Author Eddie.Zhan
     */
     List<Comment> findCommentsByEntity(int entityType, int entityId, int offset, int limit);

    /**
     * Description: 通过类型和id 查询评论
     *
     * @return int
     * @params [entityType, entityId]
     * @date 2021/2/28 0028 14:50
     * @Author Eddie.Zhan
     */
     int findCommentCount(int entityType, int entityId);

    /**
     * Description: 新增评论
     *
     * @return int
     * @params [comment]
     * @date 2021/2/28 0028 14:51
     * @Author Eddie.Zhan
     */
     int addComment(Comment comment);

/**
    * Description: 根据id查询评论
    * @params [entityId]
    * @return com.eddie.community.entity.Comment
    * @date 2021/3/3 0003 10:42
    * @Author Eddie.Zhan
    */
     Comment findCommentById(int entityId);


}
